Skip to main content

All Questions

Tagged with
0votes
2answers
529views

search of .xml files without certain tag through mac os terminal

I would appreciate having your advice on the below. Having a folder name "ABC" with thousands of .xml files inside. The core structure of XMLs is the same: <product abcd…> <...
Aleks Under's user avatar
0votes
1answer
2kviews

Split file based on beginning and end XML tag

Can split be used to split a file into multiple segments where the size of each segment is based on the number of matches of an XML element ? For example for below XML split when encounters of "<...
blue-sky's user avatar
5votes
1answer
35kviews

Unable to write changes to a file in Vim editor

I have a 100 GB of xml doc that I'm migrating to a database in waves. In vim, I can edit the file, but I'm unable to save changes with :wq, :q or :xx. I get the error message this file is read only - ...
Aaron Brandhagen's user avatar
1vote
2answers
716views

MacOS: How can I insert a line into an XML file based on it's filename? [closed]

I don't have access to a pure linux box. I have a bunch of XML files that are missing a filename callout line. I need to insert that line at a specific place in the XML file and have the filename ...
Alex M's user avatar
2votes
2answers
214views

List names of files containing a string that occurs between two other strings [closed]

I need to print a list of files with match a specific pattern -- a string occurring between two other strings. How do I do that. I don't want to extract text, just list the files that match this ...
Selena's user avatar
2votes
1answer
8kviews

Confused about how to convert XML to CSV using xmlstarlet on OS X?

I asked a question earlier and it was closed as being a duplicate: How to parse XML to CSV with a shell script?. The answer in the duplicate that was linked suggested using a tool called XMLStarlet, ...
DisplayName's user avatar
11votes
4answers
26kviews

How do I parse namespaces from an XML file using XMLLINT and BASH

Below I have an example of an Adobe XML swidtag used to track inventory. I need to parse out relevant information using xmllint in bash and output that to a new text file. For example I would like ...
macman's user avatar

close